Signed-off-by: Keir Fraser <keir@xensource.com>
hvm_cpu_down();
for ( ; ; )
- __asm__ __volatile__ ( "hlt" );
+ halt();
return 1;
}
#define EARLY_FAIL(f, a...) do { \
printk( f , ## a ); \
- for ( ; ; ) __asm__ __volatile__ ( "hlt" ); \
+ for ( ; ; ) halt(); \
} while (0)
static unsigned long __initdata initial_images_start, initial_images_end;
break;
}
-static void __attribute__((noreturn)) __machine_halt(void *unused)
+static void __attribute__((noreturn)) __machine_halt(void *unused)
{
+ local_irq_disable();
for ( ; ; )
- __asm__ __volatile__ ( "hlt" );
+ halt();
}
void machine_halt(void)
on_selected_cpus(cpumask_of_cpu(0), (void *)machine_restart,
NULL, 1, 0);
for ( ; ; )
- safe_halt();
+ halt();
}
smp_send_stop();
static void stop_this_cpu (void *dummy)
{
+ ASSERT(!local_irq_is_enabled());
+
disable_local_APIC();
hvm_cpu_down();
cpu_clear(smp_processor_id(), cpu_online_map);
for ( ; ; )
- __asm__ __volatile__ ( "hlt" );
+ halt();
}
/*